Auto merge of #2592 - jethrogb:topic/list-symlinks, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 19 Apr 2016 22:32:11 +0000 (15:32 -0700)
committerbors <bors@rust-lang.org>
Tue, 19 Apr 2016 22:32:11 +0000 (15:32 -0700)
Use stat() instead of lstat() in cargo --list

The OS-specific implementation is necessary because according to the docs, [DirEntry::metadata is fast on Windows](https://doc.rust-lang.org/stable/std/fs/struct.DirEntry.html#method.metadata). Note  `is_executable` is used elsewhere so we can't change that directly to accept `DirEntry` instead of `Metadata`.

Fixes #2591

1  2 
src/bin/cargo.rs

index a5e2bf562d10d32a1da26269f147526563236989,9f144e2b85a3f772e76ab8223d14933dd2ad835e..be0f9b3f22483177c1475a33193bb6ac9ddcb682
@@@ -9,12 -9,10 +9,12 @@@ extern crate toml
  use std::collections::BTreeSet;
  use std::env;
  use std::fs;
- use std::path::PathBuf;
+ use std::path::{Path,PathBuf};
  
 +use cargo::core::shell::Verbosity;
  use cargo::execute_main_without_stdin;
 -use cargo::util::{self, CliResult, lev_distance, Config, human, CargoResult, ChainError};
 +use cargo::util::ChainError;
 +use cargo::util::{self, CliResult, lev_distance, Config, human, CargoResult};
  
  #[derive(RustcDecodable)]
  pub struct Flags {